SRCS = $(wildcard *.cpp)
SRCS += $(wildcard *.c)
TARGETS = $(foreach src, $(SRCS), $(basename $(src)).fcgi )

CFLAGS += -pipe -Wall -g
CDFLAGS += -lm -lpcre -lfcgi++

.PHONY : all clean

all : $(TARGETS)

$(TARGETS) : %.fcgi : %.o
	gcc $(CFLAGS) $(CDFLAGS) -o $@ $<


clean :
	-rm $(TARGETS) *.o
